{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Cubehelix Color Maps in Palettable\n",
    "\n",
    "Cubehelix was designed by [D.A. Green](http://adsabs.harvard.edu/abs/2011arXiv1108.5083G) to provide a color mapping that would degrade gracefully to grayscale without losing information. This quality makes Cubehelix very useful for continuous colour scales in scientific visualizations that might be printed in grayscale at some point. [James Davenport](http://github.com/jradavenport/cubehelix) popularized Cubehelix among `matplotlib` users, and now this iteration brings Cubehelix to [Palettable's beautiful API](https://jiffyclub.github.io/palettable/) for managing color maps."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The Cubehelix functionality is contained within the `palettable.cubehelix` name space, and shares the same API as `palettable.tableau`, `palettable.brewer.sequential`, `palettable.qualitative`, `palettable.diverging`, and `palettable.wesandersen`, for instance."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from palettable import cubehelix"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Making your own Cubehelix Maps\n",
    "\n",
    "Unlike other color maps, Cubehelix is entirely algorithmic. Thus you can make your own map by instantiating a `Cubehelix` object with the `Cubehelix.make()` class method. For example, to make a color palette with 5 colors:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style type=\"text/css\">table.blockgrid {border: none;} .blockgrid tr {border: none;} .blockgrid td {padding: 0px;} #blocks95599e51-f8ca-40ac-ab8d-c759d05c1486 td {border: 1px solid white;}</style><table id=\"blocks95599e51-f8ca-40ac-ab8d-c759d05c1486\" class=\"blockgrid\"><tbody><tr><td title=\"Index: [0, 0]&#10;Color: (135, 59, 97)\" style=\"width: 100px; height: 100px;background-color: rgb(135, 59, 97);\"></td><td title=\"Index: [0, 1]&#10;Color: (125, 98, 202)\" style=\"width: 100px; height: 100px;background-color: rgb(125, 98, 202);\"></td><td title=\"Index: [0, 2]&#10;Color: (63, 181, 207)\" style=\"width: 100px; height: 100px;background-color: rgb(63, 181, 207);\"></td><td title=\"Index: [0, 3]&#10;Color: (100, 230, 115)\" style=\"width: 100px; height: 100px;background-color: rgb(100, 230, 115);\"></td><td title=\"Index: [0, 4]&#10;Color: (233, 213, 117)\" style=\"width: 100px; height: 100px;background-color: rgb(233, 213, 117);\"></td></tr></tbody></table>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cube = cubehelix.Cubehelix.make(n=5, start_hue=240., end_hue=-300.,min_sat=1., max_sat=2.5,\n",
    "                                min_light=0.3, max_light=0.8, gamma=.9)\n",
    "cube.show_as_blocks()  # requires ipythonblocks"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The Cubehelix docstring provides some guidance on how to build custom Cubehelix maps."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "        Create an arbitrary Cubehelix color palette from the algorithm.\n",
      "\n",
      "        See http://adsabs.harvard.edu/abs/2011arXiv1108.5083G for a technical\n",
      "        explanation of the algorithm.\n",
      "\n",
      "        Parameters\n",
      "        ----------\n",
      "        start : scalar, optional\n",
      "            Sets the starting position in the RGB color space. 0=blue, 1=red,\n",
      "            2=green. Default is ``0.5`` (purple).\n",
      "        rotation : scalar, optional\n",
      "            The number of rotations through the rainbow. Can be positive\n",
      "            or negative, indicating direction of rainbow. Negative values\n",
      "            correspond to Blue->Red direction. Default is ``-1.5``.\n",
      "        start_hue : scalar, optional\n",
      "            Sets the starting color, ranging from [-360, 360]. Combined with\n",
      "            `end_hue`, this parameter overrides ``start`` and ``rotation``.\n",
      "            This parameter is based on the D3 implementation by @mbostock.\n",
      "            Default is ``None``.\n",
      "        end_hue : scalar, optional\n",
      "            Sets the ending color, ranging from [-360, 360]. Combined with\n",
      "            `start_hue`, this parameter overrides ``start`` and ``rotation``.\n",
      "            This parameter is based on the D3 implementation by @mbostock.\n",
      "            Default is ``None``.\n",
      "        gamma : scalar, optional\n",
      "            The gamma correction for intensity. Values of ``gamma < 1``\n",
      "            emphasize low intensities while ``gamma > 1`` emphasises high\n",
      "            intensities. Default is ``1.0``.\n",
      "        sat : scalar, optional\n",
      "            The uniform saturation intensity factor. ``sat=0`` produces\n",
      "            grayscale, while ``sat=1`` retains the full saturation. Setting\n",
      "            ``sat>1`` oversaturates the color map, at the risk of clipping\n",
      "            the color scale. Note that ``sat`` overrides both ``min_stat``\n",
      "            and ``max_sat`` if set.\n",
      "        min_sat : scalar, optional\n",
      "            Saturation at the minimum level. Default is ``1.2``.\n",
      "        max_sat : scalar, optional\n",
      "            Satuation at the maximum level. Default is ``1.2``.\n",
      "        min_light : scalar, optional\n",
      "            Minimum lightness value. Default is ``0``.\n",
      "        max_light : scalar, optional\n",
      "            Maximum lightness value. Default is ``1``.\n",
      "        n : scalar, optional\n",
      "            Number of discrete rendered colors. Default is ``256``.\n",
      "        reverse : bool, optional\n",
      "            Set to ``True`` to reverse the color map. Will go from black to\n",
      "            white. Good for density plots where shade -> density.\n",
      "            Default is ``False``.\n",
      "        name : str, optional\n",
      "            Name of the color map (defaults to ``'custom_cubehelix'``).\n",
      "\n",
      "        Returns\n",
      "        -------\n",
      "        palette : `Cubehelix`\n",
      "            A Cubehelix color palette.\n",
      "        \n"
     ]
    }
   ],
   "source": [
    "print(cubehelix.Cubehelix.make.__doc__)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Pre-made Cubehelix Maps\n",
    "\n",
    "Of course, you can also use a number of pre-made color maps. The pre-made cubehelix maps have 16 computed colors. Since matplotlib's color maps are linearly interpolated, these work great as continuous color maps.\n",
    "\n",
    "Like the other color maps in Palettable, the cubehelix maps are available from the `palettable.cubehelix` namespace. Here is a listing of color map names:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "classic_16               sequential      \n",
      "perceptual_rainbow_16    sequential      \n",
      "purple_16                sequential      \n",
      "jim_special_16           sequential      \n",
      "red_16                   sequential      \n",
      "cubehelix1_16            sequential      \n",
      "cubehelix2_16            sequential      \n",
      "cubehelix3_16            sequential      \n"
     ]
    }
   ],
   "source": [
    "cubehelix.print_maps()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "And examples:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAqJJREFUeJzt1Uty4zAMBUCA8v2PHM7CkijZmsxsX1X3RgwA0p8K/bqq\nZgFAmFdVVfeoqqpR72f3qL6sq6rGU63GuT56o79rT/N1PMdY677Mj4+5f9S+zn2aH11z9F57P+fo\n2t/mrXeux2Xuuuf9gX7pddWYt7kac+3pS++Xuc/e7L/09nXv5/b4qdEftf6p3ufGQ637594b86wd\nZ4ye1eNe23rWqLWuqtpqnuds9TR3vPXVO+au+47z7nPvza/9a9hmr/Xe2+q79pr1196tNtf5qz/2\n3rbW53OrbX7X3q85zvU646FWo7Z5r416Ve9zo197bb3T8dHr2mrUWh+9Y+6677rneK3q97r2XvV2\nX9+ea77/Nf9VW3vnfkdnj5rjXqtbb3zMbw+1dedXb3vXb7Wued6h+72dox7u/r1/9D5r79+Sp9q+\n57xXxxmz9n+vc6Zvtf0ftuu8o+us1e/r+cc550eY598fP33vu3z/qNU9/3Pufva71/tb7Nv66F3X\nR2/9Dvw+93Te9esAgCgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyA\nSAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBI\nAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgC\nDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIM\ngEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyASAIMgEgCDIBIAgyA\nSAIMgEh/AKkMaI63ibDhAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.classic_16.show_continuous_image()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAntJREFUeJzt1kFu20AMBVDOuLfqcXqY3trTRSSLkmy42w+8t5FCcjgO\nEOR7VNUqAAjzq6rq7+8/VVU1xtzKo0bt77P1xtbdemO2udHm5nnuTa/ajr1fo/XG+Wz1s7033u37\n3FtjnGprzKqtttr8a27sc+N85ucXaj/3ufNdff6oHb1rrd7UVvscx9znHWuMWtu1p9r+3nrP69nW\nu+2d9eauenNX1fNVq89zbWafe55qn+fWXG3v9j3sdddqZ9Zlx71X47xv37/GZW6udma1fffaz/zz\nPv9hR83L2bGqxvM0V+N5fr/0xnzT+88d4zI36lnjMrfPjFqt1u7fvg8fu44do+537fOzn63z3ln3\nvbPe7Kj7XaNWzdvcqvm666j9fI6j15+3ubZjjm9zdao9Vn3szdXmWm+uy9zXfdtz+wN+VLUd+3Pc\nao/V/vOvNnepPdruvm+/s78fO+61R3u/nf2yr98NAFEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEE\nGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQY\nAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgA\nkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACR\nBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEEGACRBBgAkQQYAJEE\nGACRBBgAkQQYAJEEGACRBBgAkQQYAJH+AQqPy8SeUWRkAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.perceptual_rainbow_16.show_continuous_image()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAe1JREFUeJzt1Utu3DAQQEGK8f2vbG/szEcUoSDePKBq4wHV05IGMN4x\nxvgcABDzMcYYxzHHy98x/34eT9fOc3/OZ8d8+c7Pvssdx3y5vpsb47g59/oO6/nHrt39x/Pc9r12\nz7bacX02xnrfz8z+7Hnv+4713Pl3/dcdV2er7x5vv91/7Fg+5+q753vu5+/O7c9+Y8fj87h3rzlu\n7t3N7e61uDZX8/sd+7P3Zztfm3P1DlfPeWduNf84m6ff9eo5d2eLa/P92tM77nbMu/dazZ/v9fhd\n781d7bt6r3nxbPv338+NMb7/owEgRsAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASBIw\nAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAA\nSBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMg\nScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAk\nAQMgScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASBIwAJIEDIAkAQMgScAASPoCHAAE\njg1W92IAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.purple_16.show_continuous_image()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAktJREFUeJzt1cturDAQRdEqK///y/cOIqAwdJQMj7TWpIltbPqh7K6q\nfwUAYb6qqrpXVVWt+n7tXtXjuqpqvY3VOq+PudXPsdf143Ufq1+um2NVv1tf53V/3/Z2/tx39cu9\nb+uv/R7r15jb160+r4+5Xh/W/WGPWj2e7xrb7/1eN+bnXPcYG5/DNjbXHUP3s473NcaOr+1t7vYe\nxn7H3HnP2OOxXz3O6vn3H/e4nmP+dq6P65x/7LudcbyFMX8+2/Z19fxI5tz2THNu/whfn+3l5/J2\n7/0r6Y/r10/nd9/2+/msvq+r53Osse/+M1x9v+fzuvFMdT/z09z+bKv6tt8xd9wz5875/azqse+1\n5roee9R9Xd/G6nnvucd6WX/N7c/WvX65rs+9rzOv//v7+bMfc25vz+q+tWQ//zkHAIEEDIBIAgZA\nJAEDIJKAARBJwACIJGAARBIwACIJGACRBAyASAIGQCQBAyCSgAEQScAAiCRgAEQSMAAiCRgAkQQM\ngEgCBkAkAQMgkoABEEnAAIgkYABEEjAAIgkYAJEEDIBIAgZAJAEDIJKAARBJwACIJGAARBIwACIJ\nGACRBAyASAIGQCQBAyCSgAEQScAAiCRgAEQSMAAiCRgAkQQMgEgCBkAkAQMgkoABEEnAAIgkYABE\nEjAAIgkYAJEEDIBIAgZAJAEDIJKAARBJwACIJGAARBIwACIJGACRBAyASAIGQCQBAyCSgAEQScAA\niCRgAEQSMAAiCRgAkQQMgEgCBkAkAQMgkoABEEnAAIj0HzCFBI5yKgqeAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.jim_special_16.show_continuous_image()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAmNJREFUeJzt1UEO4yAQBMAZsv//8u4hsQHbG+XaUtUl1gADIZG7q+pv\nAUCYP1VV3aOqqro+nz3O2ljGznln7fVQG3PNw9i1NmpUd5/Px9jct89zHOdbx657zR699Xuv66XH\n3PN4nj36cf9Rfet367H0n+PHuj6f17Ff5519l3m3HmdtGT8/676219710Le2Hu+z1a1vL/veav1Q\nq8te/bB/P8/rpd97bK31Q+0zbzvbXHusu9fu8/pp7biv/Ta/+73ml3nHBezzjo1/mz9r97tZ589a\n/3ftcYk95iY9f6TleVl3OVMt91XLd5nf6/KDdVc//ojHWdbLuX6H7U80P9fxbc/nP9i2x7n/vfa9\n33w3fQ6+zFvGxuXCxtjXnPtf+o2xnGl/973P8amd/ef8OW/sa47auua4k95r27v9Vns9zr/mQW21\n15d+x7saAAIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJ\nMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkw\nACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAA\nIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAi\nCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACL9\nA4nhBI5Awi1RAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.red_16.show_continuous_image()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAm9JREFUeJzt1sFu6zAMBEBKfv//yc891JZZxwlyXWDmYoWi6LYItB1V\ntRcAhPlXVTXH74dxPOdo63qotf6ns+eZT/197lbjT99s677Xz5x7T/Pe7tVs8+aqzaO2HZ1zPNRq\nrDO9tmasvVar7fi9z/6t5nrHsdf6zhmjtvbzXX3nuTWjzb/W25pR41Yb22/9VqvH2u+Me60eZtS4\n3rXPXpvXuqpqtr5+9rbXz/2Zt2rzeNfxHHOtq+3t49Y3t7d7NeefeatvnR3r2defalVV/7fv+19r\ntb68e3vu1xf6Za+2/bX27Yx5/C97Pse+1mP1t57ed6/1cx/6xjj79mt9POeHvXe1ea+NvcZ8nXvd\nDWetXvfGtTe+7Hucd/zptnHeDbV6rvviofbhLnusjXHNud1z23HT3Pf6HXbN+KKv3YfnXr/nRrtf\nz71+551zx8vd1/rajHG/D9dnAAgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgk\nwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTA\nAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAA\niCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACI\nJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgkwACIJMAAiCTAAIgk\nwACIJMAAiCTAAIj0A9v3XY6yIp10AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.cubehelix1_16.show_continuous_image()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAmdJREFUeJzt1s1uFDEQhdEqN+//yJgF/ePpbimDxOZK52zilD0OQsEf\nXVWzACDMr6qqGv33u96/jrdZv59b94+vj1ldnzvv2IdjXOsfZ32tj711fz3f42W2VR/r2vY/0qjq\n7dy/z7pePvt2fr1v3xu32aitxn5f7599n42P9XHuOPOcjXO9nXvjY33srevz3P73+rr3xR1bdW3V\n5/q7Wf3j+XW2f/b89ZrLfdfefTZ6nt/f71hnY/8/3XrH8dnRs7aaj9m5vu1tXa9762f//vznrHtW\nj98vs2N92xvznB1nRj9nvfz84/7uWbXv13LfOTv/DR/fX3v9MrvO1XVu3bvdO8dt/dNez+/Ojbf7\nrndo7r/7c3m/jvXH7PamzeXcx+zl3P2Nmm/v3PpW/Ydz97fq401bz9xmVc93rnt8dd/1jl1vxFje\nvvu50eN8X8eyt76Xx95698cdBQCBBAyASAIGQCQBAyCSgAEQScAAiCRgAEQSMAAiCRgAkQQMgEgC\nBkAkAQMgkoABEEnAAIgkYABEEjAAIgkYAJEEDIBIAgZAJAEDIJKAARBJwACIJGAARBIwACIJGACR\nBAyASAIGQCQBAyCSgAEQScAAiCRgAEQSMAAiCRgAkQQMgEgCBkAkAQMgkoABEEnAAIgkYABEEjAA\nIgkYAJEEDIBIAgZAJAEDIJKAARBJwACIJGAARBIwACIJGACRBAyASAIGQCQBAyCSgAEQScAAiCRg\nAEQSMAAiCRgAkQQMgEgCBkAkAQMgkoABEEnAAIgkYABEEjAAIgkYAJEEDIBIAgZAJAEDIJKAARBJ\nwACI9AdkqE6Olv82VQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.cubehelix2_16.show_continuous_image()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAndJREFUeJzt1stu2zAURdFLSf7/H67NDPQwZSlp2tkB1gIK0ZcUg2bg\nnVZVvQAgzFJVVVNbP83bdGrv2bj3v7Pbve2Htblqms6zaV7nl9kvz1Wtd37uteX4L1d7vGdtOf06\nzrO/nDv2Hjd727qvz1aP9+y0d561/t25/fN43/mOpc/Hc1yvb97M+lyPPl1mxx11M/s49+jrv3Xd\nbmZ1mS3DuZ/P35zb/uZa9ln1evQ+/rbuZ8PnfX3cdTcbflZrz/VZz5qG9b43rse9qb1u967nrnfU\n9KdqXFdVTc+qNqzHvfY8r/e9/dz43k/n5n32Gtafe8/zuX3vn8/193Ncn87f7H03G9/55lyfW/Xt\ne+g1t2NWVdWn9l4Ps9c8HevjjmF/n71uZn37/nltz/FzbzezYz0de5/v9nadje+evpuqqtV8mVVb\nqn3OhnOnvV/cN23fFXPNNdXdbN5my2U2D3vX2Xx6Z7x3KwIAZBEwACIJGACRBAyASAIGQCQBAyCS\ngAEQScAAiCRgAEQSMAAiCRgAkQQMgEgCBkAkAQMgkoABEEnAAIgkYABEEjAAIgkYAJEEDIBIAgZA\nJAEDIJKAARBJwACIJGAARBIwACIJGACRBAyASAIGQCQBAyCSgAEQScAAiCRgAEQSMAAiCRgAkQQM\ngEgCBkAkAQMgkoABEEnAAIgkYABEEjAAIgkYAJEEDIBIAgZAJAEDIJKAARBJwACIJGAARBIwACIJ\nGACRBAyASAIGQCQBAyCSgAEQScAAiCRgAEQSMAAiCRgAkQQMgEgCBkAkAQMgkoABEEnAAIgkYABE\nEjAAIgkYAJEEDIBIAgZAJAEDINIXqvKhjqCom4sAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.cubehelix3_16.show_continuous_image()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Of course, you can can reverse any color map by appending `_r` to the map's name."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAbAAAABICAYAAACX+KDqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAAoFJREFUeJzt1cFO6zAURdGbwv//cGv7DRo3bhMQerMjrTWxe+0EhET3\nVlWjACDMd1VVG4+qqmrVqqqq16P6vj9mrXp93mtvz5xn72et2mtW+8+s8ahxMZv7sc4+7o3l3uc6\nqp1mW2916+21r6q69VbbuJi99v3HZ+dz7/ePO1sb+/653to4zbaL2a31t/O3tR/3bxezatuxrvuq\nqn47z67urWu//eG9X1Xt6/gZVc/P/evY/3bvdLY8d3Wvfz/3Y86+j2fG9+/35ue+3JvP9Z/vjf0d\no76qL/t5tu7Xsz5ul2fne+d33Gurx/4nvtdzc9+2/b/pfVZV9fjYz7N573K2vP8+9691XMyOde4f\n2zjNru7dL+49tvZa1/3z9/357L718/2tvT3z07NVj6ptfk/cj9nH2Tob2x/vzfetZ+Pj3tjvjKuz\ndfbHe2P53easz+/Kfe39mK1np9kf7/W+vHuu8zto2a/r/PP/z2x993K2fzsAQBYBAyCSgAEQScAA\niCRgAEQSMAAiCRgAkQQMgEgCBkAkAQMgkoABEEnAAIgkYABEEjAAIgkYAJEEDIBIAgZAJAEDIJKA\nARBJwACIJGAARBIwACIJGACRBAyASAIGQCQBAyCSgAEQScAAiCRgAEQSMAAiCRgAkQQMgEgCBkAk\nAQMgkoABEEnAAIgkYABEEjAAIgkYAJEEDIBIAgZAJAEDIJKAARBJwACIJGAARBIwACIJGACRBAyA\nSAIGQCQBAyCSgAEQScAAiCRgAEQSMAAiCRgAkQQMgEgCBkAkAQMgkoABEEnAAIgkYABEEjAAIgkY\nAJEEDIBIAgZAJAEDIJKAARBJwACIJGAARBIwACL9A87IjKC/SWF0AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "cubehelix.cubehelix3_16_r.show_continuous_image()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 2",
   "language": "python",
   "name": "python2"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
